import { FC } from 'react';
import styles from './index.less';
import { Link, NavLink } from 'umi';
import { menuConfig } from './config';
import _ from 'lodash';
import './index.less';
const Header: FC = () => {
  return (
    <div className={styles.navbar}>
      <Link to="/" className={styles.logo}>
        UmiJS
      </Link>
      <nav>
        {_.map(menuConfig, (item, key) => {
          return (
            <NavLink key={item.id} to={item.path}>
              {item.name}
            </NavLink>
          );
        })}
      </nav>
    </div>
  );
};

export default Header;
